package co.yixiang.common.security.service;

//import co.yixiang.upms.common.system.dto.UserDto;
//import co.yixiang.upms.common.system.vo.UserInfo;
import co.yixiang.retail.common.domain.UserInfo;
import co.yixiang.retail.common.dto.UserDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

/**
 * Created by hupeng on 2020/9/25.
 */
@Service
public class PhoneUserDetailService extends BaseUserDetailService {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Override
    protected UserInfo getUser(String phone) {
        // 手机验证码调用FeignClient根据电话号码查询用户
        UserDto user = null;
        if(user == null){
            logger.error("手机端找不到该用户，用户名：" + phone);
            throw new UsernameNotFoundException("手机端找不到该用户，用户名：" + phone);
        }

        return null;
    }
}
